using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace FeedBurner.Utility
{
    internal class Errors
    {
        public static bool CheckError(XmlDocument Xml)
        {
            XmlNode Status = Xml.SelectSingleNode("//rsp");

            if (Status != null)
                if (Status.Attributes["stat"].InnerText == "fail")
                {
                    XmlNode error = Xml.SelectSingleNode("//rsp/err");
                    if (error != null)
                    {
                        throw new Exception
                            (error.Attributes["msg"].InnerText);
                    }
                }
            return true;
        }
    }
}
